package cn.yx.common.jpa.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * <p>Snowflake雪花算法机器ID和数据中心ID属性配置类</p>
 *
 * @author Wgssmart
 */
@Component
@ConfigurationProperties("jpa.snowflake")
@Data
public class SnowflakeProperties {

    /**
     * 机器ID，默认值1
     */
    private Long workerId = 1L;

    /**
     * 数据中心ID，默认值1
     */
    private Long dataCenterId = 1L;

}
